////
////  SocketIOHandler.m
////  delongzhitou
////
////  Created by Mr.Wang on 2018/11/27.
////  Copyright © 2018 delongzhitou. All rights reserved.
////
//
//#import "SocketIOHandler.h"
//
//
//@interface SocketIOHandler() {
//    SocketIOClient* socket;//socket
//    
//}
//@end
//@implementation SocketIOHandler
//
//+ (SocketIOHandler *)shareInstance{
//    SocketIOHandler * userModel = nil ;
//    if (userModel == nil) {
//        NSURL *url = [[NSURL alloc]initWithString:@"http://10.0.0.100:49092"];
//        userModel  =  [[SocketIOHandler alloc]initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES, @"doubleEncodeUTF8" : @YES}];
//    }
//    return userModel;
//}
//
//
//- (instancetype)initWithSocketURL:(NSURL * _Nonnull)socketURL config:(NSDictionary * _Nullable)config{
//    self = [super init];
//    if (self) {
//        
////        @{@"log": @YES, @"forcePolling": @YES}
//        
//        self.manager = [[SocketManager alloc] initWithSocketURL:socketURL config:config];
//        socket = [self.manager defaultSocket];
//
//    }
//    return self;
//}
//
///**
// Connect to the server.
// */
//- (void)connect{
//    [socket connect];
//}
///**
// Disconnects the socket.
// */
//- (void)disconnect{
//    [socket disconnect];
//}
//- (NSUUID * _Nonnull)on:(NSString * _Nonnull)event callback:(void (^)(NSArray * data))callback{
//    return [socket on:event callback:^(NSArray*   data  , SocketAckEmitter*  ack) {
//        callback(data);
//    }];
//    
//}
//
//- (void) emit:(NSString *)event items:(NSArray *)items {
//    
//    [socket emit:event with:items];
//}
//- (void)emitWithAck:(NSString * _Nonnull)event with:(NSArray * _Nonnull)items callback:(void (^ _Nonnull)(NSArray * _Nonnull data))callback{
//    [[socket emitWithAck:event with:items] timingOutAfter:0 callback:callback];
//}
//- (void)removeAllHandlers{
//    [socket removeAllHandlers];
//}
//- (void)dealloc{
//    [socket removeAllHandlers];
//    [socket disconnect];
//    socket =  nil;
//}
//- (BOOL)isDisConnected{
//    return socket.status == SocketIOStatusDisconnected;
//}
//- (BOOL)isNotConnected{
//    return socket.status == SocketIOStatusNotConnected;
//}
//
//@end
